from pyquery import PyQuery as pq
import requests
from fake_useragent import UserAgent

url="https://www.kuaidaili.com/free/"
headers={
    "User-Agent":UserAgent().random
}
response=requests.get(url,headers=headers)
doc=pq(response.text)
trs=doc('#list tr')
for i in range(1,len(trs)):
    print("-------------------")
    ip=trs.eq(i).find('td').eq(0).text()
    port=trs.eq(i).find('td').eq(1).text()
    type=trs.eq(i).find('td').eq(3).text()
    print(ip+":"+port+"-->"+type)
